//
//  PYSwitcherCell.h
//  IHome
//
//  Created by Jim on 2019/4/6.
//  Copyright © 2019 com.zhujizheng. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN
@class PYSwitcherCell;
@protocol PYSwitcherCellDelegate <NSObject>

@optional
/**
 点击了开关

 @param switcherCell PYSwitcherCell
 @param isOn YES 开，NO 关
 */
- (void)switcherCell:(PYSwitcherCell *)switcherCell valueChanged:(BOOL)isOn;

@end

@interface PYSwitcherCell : UITableViewCell

@property (nonatomic, strong, readonly) UISwitch *switcher;

+ (instancetype)cellWithTableView:(UITableView *)tableView delegate:(nullable id<PYSwitcherCellDelegate>)delegate;

@end

NS_ASSUME_NONNULL_END
